<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>选择器权重</title>
		<!-- 选择器权重越高，选中几率越大 -->
		<style>
			*{ /*权值 0 很容易被覆盖*/
				color: #00ffff !important;
				background: #00aaff !important;
			}
			div{ /* 权值 1 */
				color: #ff0000;
				background: #5555ff;
			}
			.d1{ /* 权值 10 */
				color: #ffaaff;
				background: #005500;
			}
			div.d1{
				color: #aa0000;
				background: #00007f;
			}
			body div.d1{ /* 权值12*/
			    font-size: 25px;
				color: #5500ff;
				background: #ff00ff;
			}
			#d1{ /* 权值 100 */
				font-size: 25px;
				color: #00aa00;
				background: #aaaa00;
			}
			div#d1{ /* 权值 101 */
				font-size: 25px;
				color: #55ff7f;
				background: #55ffff;
			}
			div#d1:hover{ /* 权值 111*/
				color: #5500ff;
				background: #ff00ff;
			}
		</style>
	</head>
	<body>
		<div class="d1" id="d1" style="color: red;">Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolores facilis omnis, sit cupiditate minima reprehenderit cumque quo, tenetur itaque repudiandae est voluptas, laudantium nostrum reiciendis deserunt saepe perferendis accusamus delectus!</div>
	</body>
</html>